Skip to content

Unify metric names and update comments#2762

Merged
citizen-stig merged 11 commits intodevfrom
nikolai/metrics-clean-up
May 4, 2026
Merged

Unify metric names and update comments#2762
citizen-stig merged 11 commits intodevfrom
nikolai/metrics-clean-up

Conversation

@citizen-stig
Copy link
Copy Markdown
Member

@citizen-stig citizen-stig commented Apr 20, 2026

Description

One of the first steps to enable agentic assisted incidents or performance investigation.

This PR cleans up and documents the SDK’s Influx/Telegraf metrics layer.

  • Replaces MetricsTracker::submit_inline with dedicated Metric implementations for blob-sender and sequencer metrics. This makes metric serialization explicit, typed, easier to review, and less dependent on ad hoc line-protocol strings.
  • Moves blob-sender metric serialization into sov-blob-sender/src/metrics.rs, including typed metrics for in-flight blob counts, blob snapshots, and scope markers. The scope markers now emit marker=1i instead of the old placeholder foo=1, so dashboards need to be updated accordingly.
  • Changes sov_rollup_zkvm and sov_rollup_gas_constant metadata from Influx tags to string fields. This avoids high-cardinality tag explosions from values like hashes, heights, and transaction IDs while preserving useful filterable metadata.
  • Adds shared escaping helpers for Influx string field values, so JSON/string metadata is serialized safely and consistently instead of relying on local replace chains.
  • Renames several DB/NOMT metrics to use the sov_ prefix, making metric names consistent with the rest of the rollup metrics namespace.
  • Adds/updates documentation and changelog entries, including a metrics inventory and explicit migration notes for renamed metrics and changed marker fields.
  • Updates tests around gas-constant metrics to assert the new field-based metadata format and to parse only the received UDP payload bytes.

  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Linked Issues

Testing

Existing tests are pasing

Docs

Updated metrics description

@citizen-stig citizen-stig marked this pull request as ready for review April 21, 2026 09:26
@citizen-stig citizen-stig linked an issue Apr 21, 2026 that may be closed by this pull request
4 tasks
devin-ai-integration[bot]

This comment was marked as resolved.

citizen-stig and others added 3 commits April 21, 2026 11:45
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
# Conflicts:
#	crates/full-node/sov-blob-sender/src/in_flight_blob.rs
#	crates/full-node/sov-blob-sender/src/lib.rs
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.9%. Comparing base (19a5b6a) to head (183576e).
⚠️ Report is 17 commits behind head on dev.

Files with missing lines Patch % Lines
...ates/full-node/sov-metrics/src/influxdb/tracker.rs 0.0% 2 Missing ⚠️
crates/full-node/sov-blob-sender/src/metrics.rs 97.3% 1 Missing ⚠️
crates/full-node/sov-db/src/metrics/nomt.rs 75.0% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
crates/full-node/sov-blob-sender/src/lib.rs 94.2% <100.0%> (-1.2%) ⬇️
crates/full-node/sov-db/src/metrics/mod.rs 100.0% <100.0%> (ø)
...ov-metrics/src/influxdb/gas_constant_estimation.rs 75.0% <100.0%> (-4.7%) ⬇️
crates/full-node/sov-metrics/src/influxdb/mod.rs 89.5% <100.0%> (+3.4%) ⬆️
crates/full-node/sov-sequencer/src/metrics.rs 90.6% <100.0%> (+1.6%) ⬆️
...uencer/src/preferred/sync_sequencer_state/inner.rs 92.9% <100.0%> (-0.1%) ⬇️
crates/full-node/sov-blob-sender/src/metrics.rs 97.3% <97.3%> (ø)
crates/full-node/sov-db/src/metrics/nomt.rs 80.0% <75.0%> (ø)
...ates/full-node/sov-metrics/src/influxdb/tracker.rs 80.8% <0.0%> (-1.1%) ⬇️

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@citizen-stig citizen-stig merged commit 0e6a4e5 into dev May 4, 2026
29 checks passed
@citizen-stig citizen-stig deleted the nikolai/metrics-clean-up branch May 4, 2026 15:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics: review and check dashboards

2 participants